home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
049a.dms
/
049a.adf
/
SOURCE_CODE
/
AJC-DEMONSCROLLER.AMOS
/
AJC-DEMONSCROLLER.amosSourceCode
next >
Wrap
AMOS Source Code
|
1993-09-09
|
2KB
|
84 lines
'
' The DEMON SCROLLER
' By Andrew Campbell (Silly Names Inc)
'
' This program will load an ASCII file (at the moment
' simply called "1.SCROLL" into the array SCRIPT (max 500 lines!)
' and scroll it over a lowres backdrop (stored in bank 15 at the mo)
'
'
' Note : the backdrop MUST be only 8 colours or less.
' the text is LOWRES only but different fonts should be
' very easy to incorporate.
'
'
'
Dim SCRIPT$(500)
Global SCRIPT$()
DEMONSCROLL["1.SCROLL"]
Edit
Procedure DEMONSCROLL[FILENAME$]
Unpack 15 To 0
Screen Open 1,320,290,8,Lowres
Curs Off : Flash Off : Hide On
Cls 0
Wait Vbl
Dual Playfield 0,1
Dual Priority 1,0
Screen 0
A=$FFF
Palette 0,,,,,,,,,A,A,A,A,A,A
Screen 1
Def Scroll 1,0,0 To 320,290,0,-1
Pen 1 : Paper 0
Ink 1,0
' -----------------> Wipe script in case you've been here before!
For I=1 To 500
SCRIPT$(I)=" "
Next I
' -----------------> Open in the file to scroll
Open In 1,Dir$+FILENAME$
Set Input 10,-1
I=0
Repeat
Inc I
Line Input #1,A$
SCRIPT$(I)=A$
Until Eof(1)
' -----------------> Mark the end of the file with a "_"
SCRIPT$(I+3)="_"
Close 1
POS=0
' ----------------> Keep on scrollin' until "_" is reached. Hmmm (etc)
Repeat
Inc POS
Text 0,270,Upper$(SCRIPT$(POS))
For I=1 To 9 : Wait Vbl : Scroll 1 : Next I
If Mouse Key : Repeat : Until Mouse Key=0 : End If
Until SCRIPT$(POS)="_"
' ----------------> Fade off and close screens. As you do.
Screen 0
Fade 2 : Wait 30
Screen Close 1 : Screen Close 0
End Proc